package com.cfun.mylearn.Support.base;

import android.app.Application;

import com.cfun.mylearn.Support.module.Dagger2.Component.ApplicationComponent;
import com.cfun.mylearn.Support.module.Dagger2.DaggerApplicationComponent;

/**
 * Created by flyop on 19/06/2016.
 */
public class BaseApplication extends Application
{
    private static Application application;
    private static ApplicationComponent applicationComponent;

    @Override
    public void onCreate()
    {
        super.onCreate();
        this.application = this;
        applicationComponent = DaggerApplicationComponent.builder().build();
    }

    public static Application getInstance()
    {
        return application;
    }

    public static ApplicationComponent getApplicationComponent()
    {
        return applicationComponent;
    }
}
